﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/MasterPage.master" AutoEventWireup="true" CodeFile="EventList.aspx.cs" Inherits="Pages_Public_EventList" %>
<%@ Register Src="~/UserControls/DataTableList.ascx" TagName="DataTableList" TagPrefix="UC" %>
<%@ Register Src="~/UserControls/Pager.ascx" TagName="Pager" TagPrefix="UC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
    
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <h4 id="h4Heading" runat="server">Upcoming Events</h4>
    <div id="divMessage" class="ErrorMessageBox" runat="server" visible="false" style="display:block; margin-bottom:15px;"></div>
    
    <div>
        <asp:Repeater ID="rptEventList" runat="server">
            <HeaderTemplate>                    
                <table id="tblEventList" cellpadding="3" cellspacing="0" class="GridView">                        
                    <tr> 
                        <th>Date</th>                                   
                        <th>Title</th>
                        <th>Image</th>
                        <th style="text-align:center;">View</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="EvenRowListing">                                
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "EventDate"))%></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Title"))%></td>
                    <td>
                        <%# WebUtil.FormatImageField(AppConstants.EVENT_FILES, DataBinder.Eval(Container.DataItem, "ThumbImageFile"))%>                        
                    </td>
                    <td style="text-align:center;">                        
                        <a href='/Pages/Public/EventDetails.aspx?<%# AppConstants.QueryString.ID %>=<%# DataBinder.Eval(Container.DataItem, "ID")%>' target="_blank">Details</a>
                    </td>                        
                </tr>
            </ItemTemplate> 
            <AlternatingItemTemplate>
                <tr class="OddRowListing">
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "EventDate"))%></td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Title"))%></td>
                    <td>
                        <%# WebUtil.FormatImageField(AppConstants.EVENT_FILES, DataBinder.Eval(Container.DataItem, "ThumbImageFile"))%>                        
                    </td>
                    <td style="text-align:center;"><a href='/Pages/Public/EventDetails.aspx?<%# AppConstants.QueryString.ID %>=<%# DataBinder.Eval(Container.DataItem, "ID")%>' target="_blank">Details</a></td>                        
                </tr>
            </AlternatingItemTemplate>               
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>                 
        
        <div style="margin-top:10px;">
            <UC:Pager ID="ucEventListPager" runat="server" OnPageIndexChanged="ucEventListPager_PageIndexChanged" />
        </div>
    </div>    
</asp:Content>

